Prepare source code and tool chain

Environment: Linux Ubuntu 20.04.5 LTS

File List
1. 24.2_Linux_GPL.tar.gz
The file includes the linux kernel and open source applications.

2. stbgcc-8.3-0.4.x86_64.tar.bz2
The file includes the toolchain for building RG Linux OS and applications.

Install toolchain
1. Change to root.
$ su

2. Untar and decompress the Toolchain to /opt/toolchains.
$ tar jxvf stbgcc-8.3-0.4.x86_64.tar.bz2

Build Linux
You could change to normal user instead of root to build the linux and applications.
1. Untar and decompress the source code.
$ tar zxvf 24.2_Linux_GPL.tar.gz

2. Change path to the project source.
$ cd 24.2_Linux_GPL/rbb_lattice

3. make the file system and linux
$ ./build_3390b0_initrd.sh rg.3390v0-vvcm.dtb rg.3390v0-vvcm-CM2500.dtb rg.3390v0-vvcm-128.dtb rg.3390v0-vvcm-CM2500-128.dtb

4. After build finished, the new RG image locates at 
 ./images/ubifs-128k-2048-3390b0-lattice-bridge-RG.img